In a heat engine or heat pump, a heat exchanger may be employed to transfer heat between a thermal storage material and a working fluid for use with turbomachinery. The heat engine may be reversible, e.g., it may also be a heat pump, and the working fluid and heat exchanger may be used to transfer heat or cold to a plurality of thermal stores. The thermal energy within a given system may be stored in various forms and in a variety of containers, including pressure vessels and/or insulated vessels. For example, in solar thermal systems with storage, molten salt is commonly used to store thermal energy, while a heat exchanger is used to transfer that energy to steam or other working fluid suitable for driving turbomachinery.